#include "comm.hpp"

int main()
{
    //1.获取key值
  //  key_t key = getKey();
  //  cout<<"client key:"<<toHex(key)<<endl;

    //2.获取共享内存
    // int shm_id = getShm(key,SIZE);
    // cout<<"client shm_id:"<<shm_id<<endl;

     //3.关联共享内存
    // char* shm_address_start = attchShm(shm_id);
    //sleep(20);

     Init Client(CLIENT);
     char* shm_address_start = Client.Start();
     char c = 'A';
    //开始通信
    while(c <= 'Z') //client写入数据
    {
      shm_address_start[c - 'A'] = c;
      c++;
      sleep(1);
    }

    //4.取消关联
    // unlinkShm(shm_address_start);
    return 0;
}